<template>
    <view>
        <!-- components/customService/index.wxml -->
        <van-popup :show="showClone" custom-class="bg_color" @close="onCloseFun">
            <view class="popup_container">
                <view class="popup_card">
                    <view class="popup_title">联系客服</view>
                    <view style="height: 1rpx; background-color: #ebebeb"></view>
                    <view class="card_info">
                        <van-image width="100rpx" height="100rpx" :src="avatar"></van-image>
                        <view style="flex: 1; margin-left: 24rpx">
                            <view class="nickname">
                                {{ nickname }}
                            </view>
                            <view class="address">
                                {{ address }}
                            </view>
                        </view>
                    </view>
                    <image style="width: 440rpx; height: 440rpx; background-color: white; margin: 40rpx 0" :show-menu-by-longpress="true" :src="wechatImage"></image>
                    <text style="color: #666666; font-size: 28rpx">{{ telephone }}</text>
                    <text style="color: #666666; font-size: 28rpx">{{ time }}</text>
                </view>
                <image class="popup_close" src="https://cq-prd.oss-cn-hangzhou.aliyuncs.com/static/res/icon/popup_close.png" @tap="onCloseFun"></image>
            </view>
        </van-popup>
    </view>
</template>

<script>
// components/customService/index.js
export default {
    data() {
        return {
            showClone: false
        };
    },
    props: {
        show: {
            type: Boolean,
            default: false
        },
        avatar: {
            type: String,
            default: 'https://cq-prd.oss-cn-hangzhou.aliyuncs.com/static/res/index/kefuavatar.jpg'
        },
        nickname: {
            type: String,
            default: '金华春秋国际旅行社'
        },
        address: {
            type: String,
            default: '金华'
        },
        telephone: {
            type: String,
            default: '联系电话:(0579)82328118 13867972265'
        },
        time: {
            type: String,
            default: '工作时间：周一至周日 08:00-22:00'
        },
        wechatImage: {
            type: String,
            default: 'https://cq-prd.oss-cn-hangzhou.aliyuncs.com/static/res/index/kefuqrcode.jpg'
        }
    },
    methods: {
        onCloseFun() {
            this.setData({
                showClone: false
            });
        }
    },
    created: function () {},
    watch: {
        show: {
            handler: function (newVal, oldVal) {
                this.showClone = newVal;
            },

            immediate: true
        }
    }
};
</script>
<style>
@import './index.css';
</style>
